package router

import (
	"github.com/gin-gonic/gin"
	"loveserver/handler"
)

func loadShield(v1 *gin.RouterGroup){

	v1.Use()
	{
		v1.GET("/shield/", handler.FetchAllShield)			// get /shield => 获取所有屏蔽词
		v1.GET("/shield/:id", handler.FetchSingleShield)		// get /shield/:id => 根据id获取屏蔽词
		v1.POST("/shield", handler.AddShield)				// post /shield => 添加屏蔽词
		v1.PUT("/shield/:id", handler.UpdateShield)			// put /shield/:id => 根据id修改屏蔽词
		v1.DELETE("/shield/:id", handler.DeleteShield)		// delete /shield/:id => 根据id删除屏蔽词
	}

}